package monitor.config

object MonitorConfig {

  /**
    * 主键生成策略
    * @return
    */
    def keyGenerationStrategy:Long = {
      val idWorker = new SnowflakeIdWorker(0, 0)
      idWorker.nextId()
    }


  /**
    * 获取操作系统信息
    * @return (Int,Long) 操作系统处理器核数  可用内存大小
    */
  def systemInfo:(Int,Long) = {
    (Runtime.getRuntime.availableProcessors,Runtime.getRuntime.totalMemory)
  }




  def main(args: Array[String]): Unit = {
    println(systemInfo)

  }
}
